package com.liruo.learn.spring.mvc.controller.mvc;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:liruo
 * @Date:2023-06-22-18:51:44
 * @Desc
 */
@RequestMapping("/requestParamTest")
@RestController
public class RequestParamTestController {
  @GetMapping(params = "arg1")
  public String get1(
      @RequestParam("arg1") String arg
  ){
    return "get1";
  }
  @GetMapping(params = "arg2")
  public String get2(
      @RequestParam("arg2") String arg1
  ){
    return "get2";
  }
  @GetMapping(params = {"arg1","arg2"})
  public String get34(
      @RequestParam("arg1") String arg1,
      @RequestParam("arg2") String arg2
  ){
    return "get34";
  }
}
